package com.wxzz.elearning.common.vo;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "返回页结果", description = "")
public class PageVO<T> implements Serializable {

    @ApiModelProperty(name = "total",value = "总记录数")
    private long total; //总记录数

    @ApiModelProperty(name = "data",value = "当前页结果")
    private List<T> data;  //当前页结果

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public PageVO(Long total, List<T> data) {
        super();
        this.total = total;
        this.data = data;
    }
}
